The dependent variable Activity state is only available when you selected Activity analysis in the Experiment Settings and you track only one subject per arena. With Activity state you can calculate how long and how frequent your subject has been in different activity states. These states depend on the total pixel change within the arena between a sample and the previous sample. The number of states and their thresholds are user-defined.
When the subject goes missing for more than three samples, the current Activity state is ended and the remaining missing samples are ignored.
Calculation
Step 1 - Calculation of proportion of pixel change
All pixel coordinates in the arena, so not only of the detected subject, are determined immediately after they have been detected. The gray scale values of all pixels are compared with the previous sample to determine the number of changed pixels in the arena between the two. The formula for Activity is simply the number of changed pixels for the current sample k divided by the total number of pixels in the arena:
Activity is calculated by taking every pixel and comparing it between the current image and the previous one. If all the pixels are the same, there is zero activity. If all the pixels are different, there is 100% activity. If the animal is moving and increases its velocity (whilst keeping the same shape) there will be an increase in activity, because the pixels belonging to the animal are increasingly different as it moves faster.
To smooth the values of Activity, an Averaging interval is used. This gives you the option to specify the number of samples for calculating a running average of Activity. The Activity percentage is summed over the number of samples that you specify, and divided by the number of samples. This way, sudden changes in surface area caused by such factors as the animal entering a shadowed area, or a reflection, are smoothed out.
note When you export the dependent variable, each row in the export file contains the Activity value, but not the averaging interval.
Step 3 - Calculation of the Activity state dependent variable
The Activity state variable is established for each sample, according to the value of running average Activity relative to the thresholds. You can define between two and four states, varying from Inactive (below the lowest threshold) to Highly active (above the highest threshold).
How to specify Activity state
1.Click the Add button next to Activity State.
2.Enter the following:
Averaging Interval: The number of samples over which the running average mobility is based. The default value is 1, that is, the current value of Elongation is only based on the current image.
3.Under Number of states, select the number of activity levels you are interested in. The following options are available, dependent on the number of states:
2 states: Highly active above and Inactive below.
3 states: Highly active above, Moderately active between and Inactive below.
4 states: Highly active above, Active between, Moderately active between and Inactive below.
4.Under Thresholds, specify thresholds for the states defined in step 3.
You can enter a number with up to two decimals.
▪Under State duration threshold, in the field next to Exclude instances shorter than, enter how long a state must last before it is scored as one of the four Activity states. If the duration passes this threshold, the samples in this time length are scored as one of the four states according to the criteria above. If the duration does not pass the threshold, the previous state ends, but no new state is defined. When you visualize Activity state in the Integrated Visualization, this is displayed as a gap between two adjacent color bars, which represent the scored activity states.
▪Under Calculate statistics for, select at least one of the states defined in step 3.
5.Complete the procedure to add the variable. See Calculate statistics: procedure.
To find the optimal activity thresholds, run a few test trials and check in the Analysis Results and Scoring pane the values of Activity when the animal shows such behavior. These values are calculated real-time during acquisition. See an example in Fear conditioning: view Activity state.
Notes
▪important The Activity detection thresholds set in Acquisition are not used in analysis. When you specify Activity in your Analysis profile, enter the new values in the appropriate fields.
▪In some cases the number of samples available for smoothing can be less than the averaging interval entered. For example, when there are missing samples or at the beginning of the track. In such cases EthoVision XT uses the samples available in the specified interval. For example, the value of Activity for the first sample of the track is always calculated over one sample.
▪You set the thresholds during acquisition, but you can override them when calculating statistics to produce new values for Activity state. To see what the original values of Activity state thresholds were (unless you have changed them while acquiring data), open the Acquisition module and click the button under Activity in the Analysis results and Scoring pane.
Frequently asked questions about Activity
1.What is the difference between Activity and Mobility?
Activity is the percentage change in all pixels in the arena between the current sample and the previous sample. This is independent of the detected subject.
Mobility is the percentage pixel change between the current sample and the previous sample in the detected subject only. See Rotation
2.When should I use Activity and when should I use Mobility?
Use Activity when the dependent variable Mobility does not give satisfying results, or if detection of your subject is difficult. This can be the case when bars of the shock grid floor in the background complicate detection of the animal’s surface area, or when the animal is very large compared to the arena size.
3.Does Activity detection depend on the size of the subject relative to the arena?
Yes. Activity is calculated as the number of changed pixels divided by the total number of pixels in the arena. The smaller the subject relative to the arena, the smaller the activity will be. When your animal is very large in comparison to the arena size, for example when you have a rat in a small cage, activity detection is generally more suitable than mobility detection.
4.Does Activity detection depend on the video resolution?
Yes. The higher the video resolution, the greater the number of pixels that change when the subject moves. Therefore, when you have a high video resolution, it is less likely that a small movement of the subject results in an abrupt change in activity.
However, this effect is present at very low resolution (for example, when the subject is less than 100 pixels large). We advise you not to compare values of Activity between videos of different resolutions.
5.Does Activity detection depend on sample rate?
Yes. Since Activity is detected from the change in pixels between two samples, and the pixel change depends on how frequently the area is acquired (that is, the sample rate), Activity depends on the sample rate. All being equal, the higher the sample rate, the smaller the pixel change. See also the effect of the sample rate on Mobility in Frequently asked questions about Mobility.
Activity can be used to determine freezing behavior in rodents. Also, it may be used to assess inactivity of rodents in a Porsolt Swim Test. Furthermore, the startle response of zebrafish larvae can automatically be detected with (in)activity.